<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/WEB-INF/includes/common-import.jsp"%>
<%@ taglib uri="/page" prefix="p"%>
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9"> <![endif]-->
<!--[if !IE]><!--> <html lang="en"> <!--<![endif]-->
<head>
	<meta charset="utf-8" />
	<title>${systemName}</title>
	<meta content="width=device-width, initial-scale=1.0" name="viewport" />
	<meta content="" name="description" />
	<meta content="" name="author" />
	<%@ include file="/WEB-INF/includes/common-component-edit.jsp"%>

	<script type="text/javascript">

		var api = frameElement.api, W = api.opener;

		function saveKind() {
			var value = wForm.getcheckedValue();
			if(value==""){
				value="请选择评价类别！";
				alert(value);
				return;
			}
			if(confirm("确定选择这些评价类别吗？")){
				var fatherFrom = W.$("#inputForm");
				//alert("${basePath }teacherExamSetting/saveKind/${code}/${teacherId}/"+value);
				fatherFrom.attr("action","${basePath }teacherExamSetting/saveKind/${code}/${teacherId}/"+value);
				fatherFrom.submit();
				api.close();
			}
		}

		function cancle(){
			api.close();
		}
	</script>
</head>
<body class="page-header-fixed">
	<!-- BEGIN CONTAINER -->
	<div class="page-container row-fluid">
		<div class="page-content">
			<!-- BEGIN PAGE CONTAINER-->        
			<div class="container-fluid">
				<!-- BEGIN PAGE HEADER-->
				<div class="row-fluid">
					<div class="span12">
						<h3 class="page-title">
							选择评价类别
						</h3>
					</div>
				</div>
				<div class="row-fluid">
					<div class="span12">
						<form id="searchForm" class="form-horizontal" action="${basePath }teacherExamSetting/selectKind/${code}/${teacherId}" method="post">
							<div class="portlet">
								<div class="portlet-title">
									<div class="input-prepend input-append">
										<span class="add-on"><i class="icon-search"></i></span>
										<input class="m-wrap placeholder-no-fix" type="text" 
											placeholder="name" id="name" name="map['name']" value="${searchParams.map['name'] }"/>
										<button type="submit" class="btn green pull-right" >查询</button> 
									</div>
								</div>
							</div>
						</form>
						<div class="alert alert-success ${empty MESSAGE ?'hide':'' }">
							<button class="close" data-dismiss="alert"></button>
							<span>${MESSAGE }</span>
						</div>
						<div class="portlet box light-grey">
							<table class="table table-striped table-bordered table-hover" id="sample_1">
								<thead>
									<tr>
										<th style="width:40px;"><input id="all" type="checkbox" width="10px;" onclick="wForm.allCheck()"></th>
										<th style="width:40px;">序号</th>
										<th>评价类别名称</th>
										<th>备注</th>
									</tr>
								</thead>
								<tbody>
									<c:forEach items="${list}" var="list" varStatus="status">
										<tr class="odd gradeX">
											<td><input type="checkbox" name="subcheckBox"  onclick="wForm.checkT_F()" value="${list.id}"/></td>
											<td>${status.count}</td>
											<td>${list.kindName }</td>
											<td>${list.remark }</td>
										</tr>
									</c:forEach>
								</tbody>
							</table>
							<p:page url="teacherExamSetting" cpage="${page.cpage }" perItem="${page.perItem }" totalItem="${page.totalItem }"/>
						</div>
						<div class="form-actions clearfix">
							<button class="btn blue" type="button" onclick="saveKind();"><i class="icon-ok"></i>选择</button>
							&nbsp;&nbsp;
							<a class="btn" onclick="cancle();">返回</a>
						</div>
					</div>
				</div>
			</div>
		</div>
		<form id="updateForm" method="post">
		</form>
	</div>
</body>
</html>
